package Driver;

import Service.InputManager;
import Service.OutputManager;

public class Driver 
{

	/**
	 *    W E L C O M E
	 * 
	 *  --> E N T R Y  <---
	 *  --> P O I N T  <---
	 *  
	 *    W E L C O M E
	 *    
	 * @param args Not used.
	 */
	public static void main(String args[])
	{
		// Greet the user
		OutputManager.println("ERS SERVER Iteration 1 Launched.");
		OutputManager.println("Built by Yury Kitaev");
		
		// Load the data from the database (emulated)
		Facade.initializeAll();
		
		OperationStrategy strategy = null;
		
		int choice = 0;
		while (choice != 3)
		{
			OutputManager.offerChoiceMenu("*** MAIN MENU ***\nChoose Operation Mode.", "Manual", "Multithreading Automatied Testing", "Quit");
			
			choice = InputManager.readInput(1, 3);
		
			if (1 == choice)
			{
				strategy = new ManualOperationStrategy();
				strategy.run();
			}
			else if (2 == choice)
			{
				strategy = new MultithreadingTestOperationStrategy();
				strategy.run();
			}
		}
		
		OutputManager.println("\nProgram terminated.");
	}
}
